package org.springframework.web.servlet;

import java.io.IOException;

import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

public class HelloServlet1 implements Servlet {

	/**
	 * 无参数的构造函数
	 */
	public HelloServlet1(){
		System.out.print("HelloServlet'Constructor execute!");
	}//最先调用
	
	@Override
	public void destroy() {
		System.out.print("HelloServlet's destroy method execute!");
	}//退出之前调用

	@Override
	public ServletConfig getServletConfig() {
		return null;
	}

	@Override
	public String getServletInfo() {
		return null;
	}

	@Override
	public void init(ServletConfig config) throws ServletException {
		System.out.print("HelloServlet's init method execute!");
	}//第二调用

	@Override
	public void service(ServletRequest request, ServletResponse response) throws ServletException, IOException {
		System.out.print("HelloServlet's service method execute!");
	}//第三调用……第n调用

}
